#include <QCoreApplication>
#include <QtDBus>
#include <dbus_test.h>
int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    QDBusConnection bus = QDBusConnection::connectToBus("tcp:host=localhost,port=12434","localhost_ip");
    if(!bus.isConnected())
    {
        qDebug()<<"connect error:"<<bus.lastError().message();
        return 0;
    }
    bus.registerService("cyg.ia.rd");
    Dbus_test dbusobj;
    bool ret = bus.registerObject("/test","TM3.DeviceManager.test",&dbusobj,QDBusConnection::ExportAllSlots
                                  |QDBusConnection::ExportAllSignals);
    qDebug()<<ret;
    return a.exec();
}
